INCLUDE(berryTestingHelpers)

INCLUDE(${BLUEBERRY_BINARY_DIR}/BlueBerryBundleList.cmake)

SET(BLUEBERRY_TEST_APP "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${OSGI_APP}")
GET_TARGET_PROPERTY(_is_macosx_bundle ${OSGI_APP} MACOSX_BUNDLE)
IF(APPLE AND _is_macosx_bundle) 
  SET(BLUEBERRY_TEST_APP "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${OSGI_APP}.app/Contents/MacOS/${OSGI_APP}")
ENDIF()

MACRO_COLLECT_PLUGINS(OUTPUT_DIR ${BLUEBERRY_TEST_PLUGINS_OUTPUT_DIR}
                      CACHE_PLUGIN_TARGETS BLUEBERRY_ENABLED_TEST_PLUGINS
                      BUNDLE_LIST_PATH "${BLUEBERRY_BINARY_DIR}/BlueBerryTestBundleList.cmake"
                      CMAKE_CACHE_PREFIX "BLUEBERRY_TEST"
                      ${BLUEBERRY_BUILD_ALL_PLUGINS_OPTION})
